import Request from '@/server/http'
import Api from '@/server/api'
export default {
  //获取当前屏幕宽度
  getClientWidth(){
    const width = document.body.clientWidth
    return width
  },
  //获取当前问候
  getNowHello(){
    const time = new Date()
    const hour = time.getHours()
    let hello = ''
    let helloDesc = ''
    if((hour>5&&hour<11)||hour==11){
      hello = '早安'
      helloDesc = '开始您一天的工作吧！'
    }else if((hour>11&&hour<16)||hour==16){
      hello = '午安'
      helloDesc = '工作久了的话，站起来走走吧~'
    }else if((hour>16&&hour<19)||hour==19){
      hello = '下午好'
      helloDesc = '记得进行一天的工作总结哦！'
    }else if((hour>19&&hour<24)||hour==24){
      hello = '晚上好'
      helloDesc = '工作再忙也要注意休息呀'
    }else{
      hello = '晚安'
      helloDesc = '已经很晚了，注意身体健康哦'
    }
    return {hello,helloDesc}
  }
}